package com.ttdc.pojo;

import java.util.ArrayList;
import java.util.List;

public class DishesExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DishesExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * 
     * 
     * @author wcyong
     * 
     * @date 2018-09-22
     */
    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andCpIdIsNull() {
            addCriterion("cp_id is null");
            return (Criteria) this;
        }

        public Criteria andCpIdIsNotNull() {
            addCriterion("cp_id is not null");
            return (Criteria) this;
        }

        public Criteria andCpIdEqualTo(Integer value) {
            addCriterion("cp_id =", value, "cpId");
            return (Criteria) this;
        }

        public Criteria andCpIdNotEqualTo(Integer value) {
            addCriterion("cp_id <>", value, "cpId");
            return (Criteria) this;
        }

        public Criteria andCpIdGreaterThan(Integer value) {
            addCriterion("cp_id >", value, "cpId");
            return (Criteria) this;
        }

        public Criteria andCpIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("cp_id >=", value, "cpId");
            return (Criteria) this;
        }

        public Criteria andCpIdLessThan(Integer value) {
            addCriterion("cp_id <", value, "cpId");
            return (Criteria) this;
        }

        public Criteria andCpIdLessThanOrEqualTo(Integer value) {
            addCriterion("cp_id <=", value, "cpId");
            return (Criteria) this;
        }

        public Criteria andCpIdIn(List<Integer> values) {
            addCriterion("cp_id in", values, "cpId");
            return (Criteria) this;
        }

        public Criteria andCpIdNotIn(List<Integer> values) {
            addCriterion("cp_id not in", values, "cpId");
            return (Criteria) this;
        }

        public Criteria andCpIdBetween(Integer value1, Integer value2) {
            addCriterion("cp_id between", value1, value2, "cpId");
            return (Criteria) this;
        }

        public Criteria andCpIdNotBetween(Integer value1, Integer value2) {
            addCriterion("cp_id not between", value1, value2, "cpId");
            return (Criteria) this;
        }

        public Criteria andCpNameIsNull() {
            addCriterion("cp_name is null");
            return (Criteria) this;
        }

        public Criteria andCpNameIsNotNull() {
            addCriterion("cp_name is not null");
            return (Criteria) this;
        }

        public Criteria andCpNameEqualTo(String value) {
            addCriterion("cp_name =", value, "cpName");
            return (Criteria) this;
        }

        public Criteria andCpNameNotEqualTo(String value) {
            addCriterion("cp_name <>", value, "cpName");
            return (Criteria) this;
        }

        public Criteria andCpNameGreaterThan(String value) {
            addCriterion("cp_name >", value, "cpName");
            return (Criteria) this;
        }

        public Criteria andCpNameGreaterThanOrEqualTo(String value) {
            addCriterion("cp_name >=", value, "cpName");
            return (Criteria) this;
        }

        public Criteria andCpNameLessThan(String value) {
            addCriterion("cp_name <", value, "cpName");
            return (Criteria) this;
        }

        public Criteria andCpNameLessThanOrEqualTo(String value) {
            addCriterion("cp_name <=", value, "cpName");
            return (Criteria) this;
        }

        public Criteria andCpNameLike(String value) {
            addCriterion("cp_name like", value, "cpName");
            return (Criteria) this;
        }

        public Criteria andCpNameNotLike(String value) {
            addCriterion("cp_name not like", value, "cpName");
            return (Criteria) this;
        }

        public Criteria andCpNameIn(List<String> values) {
            addCriterion("cp_name in", values, "cpName");
            return (Criteria) this;
        }

        public Criteria andCpNameNotIn(List<String> values) {
            addCriterion("cp_name not in", values, "cpName");
            return (Criteria) this;
        }

        public Criteria andCpNameBetween(String value1, String value2) {
            addCriterion("cp_name between", value1, value2, "cpName");
            return (Criteria) this;
        }

        public Criteria andCpNameNotBetween(String value1, String value2) {
            addCriterion("cp_name not between", value1, value2, "cpName");
            return (Criteria) this;
        }

        public Criteria andCpMsIsNull() {
            addCriterion("cp_ms is null");
            return (Criteria) this;
        }

        public Criteria andCpMsIsNotNull() {
            addCriterion("cp_ms is not null");
            return (Criteria) this;
        }

        public Criteria andCpMsEqualTo(String value) {
            addCriterion("cp_ms =", value, "cpMs");
            return (Criteria) this;
        }

        public Criteria andCpMsNotEqualTo(String value) {
            addCriterion("cp_ms <>", value, "cpMs");
            return (Criteria) this;
        }

        public Criteria andCpMsGreaterThan(String value) {
            addCriterion("cp_ms >", value, "cpMs");
            return (Criteria) this;
        }

        public Criteria andCpMsGreaterThanOrEqualTo(String value) {
            addCriterion("cp_ms >=", value, "cpMs");
            return (Criteria) this;
        }

        public Criteria andCpMsLessThan(String value) {
            addCriterion("cp_ms <", value, "cpMs");
            return (Criteria) this;
        }

        public Criteria andCpMsLessThanOrEqualTo(String value) {
            addCriterion("cp_ms <=", value, "cpMs");
            return (Criteria) this;
        }

        public Criteria andCpMsLike(String value) {
            addCriterion("cp_ms like", value, "cpMs");
            return (Criteria) this;
        }

        public Criteria andCpMsNotLike(String value) {
            addCriterion("cp_ms not like", value, "cpMs");
            return (Criteria) this;
        }

        public Criteria andCpMsIn(List<String> values) {
            addCriterion("cp_ms in", values, "cpMs");
            return (Criteria) this;
        }

        public Criteria andCpMsNotIn(List<String> values) {
            addCriterion("cp_ms not in", values, "cpMs");
            return (Criteria) this;
        }

        public Criteria andCpMsBetween(String value1, String value2) {
            addCriterion("cp_ms between", value1, value2, "cpMs");
            return (Criteria) this;
        }

        public Criteria andCpMsNotBetween(String value1, String value2) {
            addCriterion("cp_ms not between", value1, value2, "cpMs");
            return (Criteria) this;
        }

        public Criteria andCpPriceIsNull() {
            addCriterion("cp_price is null");
            return (Criteria) this;
        }

        public Criteria andCpPriceIsNotNull() {
            addCriterion("cp_price is not null");
            return (Criteria) this;
        }

        public Criteria andCpPriceEqualTo(Double value) {
            addCriterion("cp_price =", value, "cpPrice");
            return (Criteria) this;
        }

        public Criteria andCpPriceNotEqualTo(Double value) {
            addCriterion("cp_price <>", value, "cpPrice");
            return (Criteria) this;
        }

        public Criteria andCpPriceGreaterThan(Double value) {
            addCriterion("cp_price >", value, "cpPrice");
            return (Criteria) this;
        }

        public Criteria andCpPriceGreaterThanOrEqualTo(Double value) {
            addCriterion("cp_price >=", value, "cpPrice");
            return (Criteria) this;
        }

        public Criteria andCpPriceLessThan(Double value) {
            addCriterion("cp_price <", value, "cpPrice");
            return (Criteria) this;
        }

        public Criteria andCpPriceLessThanOrEqualTo(Double value) {
            addCriterion("cp_price <=", value, "cpPrice");
            return (Criteria) this;
        }

        public Criteria andCpPriceIn(List<Double> values) {
            addCriterion("cp_price in", values, "cpPrice");
            return (Criteria) this;
        }

        public Criteria andCpPriceNotIn(List<Double> values) {
            addCriterion("cp_price not in", values, "cpPrice");
            return (Criteria) this;
        }

        public Criteria andCpPriceBetween(Double value1, Double value2) {
            addCriterion("cp_price between", value1, value2, "cpPrice");
            return (Criteria) this;
        }

        public Criteria andCpPriceNotBetween(Double value1, Double value2) {
            addCriterion("cp_price not between", value1, value2, "cpPrice");
            return (Criteria) this;
        }

        public Criteria andCpVipprivceIsNull() {
            addCriterion("cp_vipprivce is null");
            return (Criteria) this;
        }

        public Criteria andCpVipprivceIsNotNull() {
            addCriterion("cp_vipprivce is not null");
            return (Criteria) this;
        }

        public Criteria andCpVipprivceEqualTo(Double value) {
            addCriterion("cp_vipprivce =", value, "cpVipprivce");
            return (Criteria) this;
        }

        public Criteria andCpVipprivceNotEqualTo(Double value) {
            addCriterion("cp_vipprivce <>", value, "cpVipprivce");
            return (Criteria) this;
        }

        public Criteria andCpVipprivceGreaterThan(Double value) {
            addCriterion("cp_vipprivce >", value, "cpVipprivce");
            return (Criteria) this;
        }

        public Criteria andCpVipprivceGreaterThanOrEqualTo(Double value) {
            addCriterion("cp_vipprivce >=", value, "cpVipprivce");
            return (Criteria) this;
        }

        public Criteria andCpVipprivceLessThan(Double value) {
            addCriterion("cp_vipprivce <", value, "cpVipprivce");
            return (Criteria) this;
        }

        public Criteria andCpVipprivceLessThanOrEqualTo(Double value) {
            addCriterion("cp_vipprivce <=", value, "cpVipprivce");
            return (Criteria) this;
        }

        public Criteria andCpVipprivceIn(List<Double> values) {
            addCriterion("cp_vipprivce in", values, "cpVipprivce");
            return (Criteria) this;
        }

        public Criteria andCpVipprivceNotIn(List<Double> values) {
            addCriterion("cp_vipprivce not in", values, "cpVipprivce");
            return (Criteria) this;
        }

        public Criteria andCpVipprivceBetween(Double value1, Double value2) {
            addCriterion("cp_vipprivce between", value1, value2, "cpVipprivce");
            return (Criteria) this;
        }

        public Criteria andCpVipprivceNotBetween(Double value1, Double value2) {
            addCriterion("cp_vipprivce not between", value1, value2, "cpVipprivce");
            return (Criteria) this;
        }

        public Criteria andCpPhotoIsNull() {
            addCriterion("cp_photo is null");
            return (Criteria) this;
        }

        public Criteria andCpPhotoIsNotNull() {
            addCriterion("cp_photo is not null");
            return (Criteria) this;
        }

        public Criteria andCpPhotoEqualTo(String value) {
            addCriterion("cp_photo =", value, "cpPhoto");
            return (Criteria) this;
        }

        public Criteria andCpPhotoNotEqualTo(String value) {
            addCriterion("cp_photo <>", value, "cpPhoto");
            return (Criteria) this;
        }

        public Criteria andCpPhotoGreaterThan(String value) {
            addCriterion("cp_photo >", value, "cpPhoto");
            return (Criteria) this;
        }

        public Criteria andCpPhotoGreaterThanOrEqualTo(String value) {
            addCriterion("cp_photo >=", value, "cpPhoto");
            return (Criteria) this;
        }

        public Criteria andCpPhotoLessThan(String value) {
            addCriterion("cp_photo <", value, "cpPhoto");
            return (Criteria) this;
        }

        public Criteria andCpPhotoLessThanOrEqualTo(String value) {
            addCriterion("cp_photo <=", value, "cpPhoto");
            return (Criteria) this;
        }

        public Criteria andCpPhotoLike(String value) {
            addCriterion("cp_photo like", value, "cpPhoto");
            return (Criteria) this;
        }

        public Criteria andCpPhotoNotLike(String value) {
            addCriterion("cp_photo not like", value, "cpPhoto");
            return (Criteria) this;
        }

        public Criteria andCpPhotoIn(List<String> values) {
            addCriterion("cp_photo in", values, "cpPhoto");
            return (Criteria) this;
        }

        public Criteria andCpPhotoNotIn(List<String> values) {
            addCriterion("cp_photo not in", values, "cpPhoto");
            return (Criteria) this;
        }

        public Criteria andCpPhotoBetween(String value1, String value2) {
            addCriterion("cp_photo between", value1, value2, "cpPhoto");
            return (Criteria) this;
        }

        public Criteria andCpPhotoNotBetween(String value1, String value2) {
            addCriterion("cp_photo not between", value1, value2, "cpPhoto");
            return (Criteria) this;
        }

        public Criteria andCxIdIsNull() {
            addCriterion("cx_id is null");
            return (Criteria) this;
        }

        public Criteria andCxIdIsNotNull() {
            addCriterion("cx_id is not null");
            return (Criteria) this;
        }

        public Criteria andCxIdEqualTo(Integer value) {
            addCriterion("cx_id =", value, "cxId");
            return (Criteria) this;
        }

        public Criteria andCxIdNotEqualTo(Integer value) {
            addCriterion("cx_id <>", value, "cxId");
            return (Criteria) this;
        }

        public Criteria andCxIdGreaterThan(Integer value) {
            addCriterion("cx_id >", value, "cxId");
            return (Criteria) this;
        }

        public Criteria andCxIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("cx_id >=", value, "cxId");
            return (Criteria) this;
        }

        public Criteria andCxIdLessThan(Integer value) {
            addCriterion("cx_id <", value, "cxId");
            return (Criteria) this;
        }

        public Criteria andCxIdLessThanOrEqualTo(Integer value) {
            addCriterion("cx_id <=", value, "cxId");
            return (Criteria) this;
        }

        public Criteria andCxIdIn(List<Integer> values) {
            addCriterion("cx_id in", values, "cxId");
            return (Criteria) this;
        }

        public Criteria andCxIdNotIn(List<Integer> values) {
            addCriterion("cx_id not in", values, "cxId");
            return (Criteria) this;
        }

        public Criteria andCxIdBetween(Integer value1, Integer value2) {
            addCriterion("cx_id between", value1, value2, "cxId");
            return (Criteria) this;
        }

        public Criteria andCxIdNotBetween(Integer value1, Integer value2) {
            addCriterion("cx_id not between", value1, value2, "cxId");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    /**
     * 
     * 
     * @author wcyong
     * 
     * @date 2018-09-22
     */
    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}